package com.ityuan.springcloud.service.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;
import com.ityuan.springcloud.client.user.entity.User;
import com.ityuan.springcloud.service.OrderService;

@RestController
public class OrderController {

	@Autowired
	private OrderService orderService;
	
	@GetMapping(value = "/order/getUser/{id}")
	public User getById(@PathVariable("id") Long id) {
		return this.orderService.getOrderUserById(id);
	}
	
	@GetMapping(value = "/order/getUser2/{id}")
	public User get2ById(@PathVariable("id") Long id) {
		return this.orderService.getOrderUser2ById(id);
	}
}
